<?php if(!defined('A')) exit;?>
<?php
$tag_attrs=$object->tags($item['id']);
$tag_attrs=is_array($tag_attrs)?$tag_attrs:array();
$xx=implode(',',$tag_attrs);

$tag_words=$object->wordtags($item['id'],$item['level_id']);
$tag_words=is_array($tag_words)?$tag_words:array();

$tag_single_arr=$object->wwwww($item['id']);
$yy=implode(',',$tag_single_arr);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $item['title'];?>_<?php echo $item['level_id'];?>级英语阅读_<?php echo $xx;?>_英语分级阅读</title>
<meta name="keywords" content="<?php echo $item['level_id'];?>级英语阅读,<?php echo $xx;?>,<?php echo $yy;?>" />
<meta name="description" content="<?php echo $item['description'];?>" />
<!--[if IE 6]>
<?php
loadjs('DD_belatedPNG_0.0.8a-min',P_JS);
?>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<?php
loadjs(array('common','jquery','qsbdcplayer','jquery.colorbox','mypaper','user'),P_JS);
loadcss(array('colorbox'),P_CSS);
loadcss(array('main'),$this->virtual_pjt['PROJECT_CSS_URL']);
//loadjs(array('index'),$this->virtual_pjt['PROJECT_JS_URL']);
?>
<script>
$(document).ready(function(){
	if(flashdetect.f){
		insertaudio('','qsplayer_1','/common/static/js/');
	}
});
</script>
</head>
<body>
<!--头部开始-->
<?php include(dirname(dirname(__FILE__)).'/header.inc.php');?>
<!--头部结束-->

<div class="m" id="list_box">
<div class="index_l r_bian">
<?php
$l=$object->mylevel($item['level_id']);
?>
<div id="bread">当前位置：<a href="/">首页</a> -> <a href="<?php echo $l['linkurl'];?>"><?php echo $item['level_id'];?>级英语阅读</a> - > <?php echo $item['title'];?></div>
<div align="center" class="r_title" id="wzbt"><?php echo $item['title'];?></div>
<div style="text-align:center">
添加时间：<?php echo date('Y-m-d H:i:s',$item['add_time']);?> 
浏览次数：<script src="<?php echo url('arc','update_arc_hits','id='.$item['id'],$this->virtual_pjt['PROJECT_URL']);?>"></script>
</div>
<div style="text-align:right;color:#C33;font-weight:bold;">Tip:点击数字可快速查看单词解释&nbsp;&nbsp;</div>
<div class="wzbox">
<?php echo $item2['content_cpl'];?>
</div>

<div class="jbxz" style="text-align:center;">
<img src="/front/static/images/197.gif" width="16" height="16" align="absmiddle">&nbsp;<a href="<?php echo $l['linkurl'];?>" target="_blank"><?php echo $item['level_id'];?>级</a>&nbsp;
<img src="/front/static/images/103.gif" width="16" height="16" align="absmiddle">&nbsp;
<?php

foreach($tag_attrs as $v){
?>
<a href="<?php echo url('attrtag','arc_list','tag='.urlencode($v),$this->virtual_pjt['PROJECT_URL']);?>" target="_blank"><?php echo $v;?></a>&nbsp;
<?php
}
unset($tag_attrs);
?>
</div>
<div class="jbxz">
<img src="/front/static/images/128.gif" width="16" height="16" align="absmiddle">&nbsp;单词标签:
<?php
foreach($tag_words as $k=>$v){
?>
<a href="<?php echo url('wordtag','arc_list','tag='.urlencode($v['word']),$this->virtual_pjt['PROJECT_URL']);?>" target="_blank"><?php echo $v['word'];?></a>&nbsp;
<?php
}
?>
</div>
<br />
<!--单词开始-->
<div id="wz_jx">
<br />
<div style="text-align:right;font-weight:bold;color:#09F;">点击<img src="/front/static/images/play.gif" alt="收听单词发音" align="absmiddle"/>收听单词发音&nbsp;&nbsp;</div><br />
<?php

foreach($tag_words as $k=>$v){
	$l=$object->mylevel($v['level_id']);
?>
<div style="width:100%;" class="zc_boxl">
<table width="100%" border="0">
  <tr>
    <td class="td_name">
    <a name="_w_<?php echo $v['index'];?>" id="_w_<?php echo $v['index'];?>" > </a>
    <span class="circle"><?php echo $v['index'];?></span>
    <span class="danci"> <a href="<?php echo url('wordtag','arc_list','tag='.urlencode($v['word']),$this->virtual_pjt['PROJECT_URL']);?>" target="_blank"><?php echo $v['word'];?></a> [<?php echo $v['spell']?>] </span>
    <img src="/front/static/images/play.gif" alt="<?php echo $v['src'];?>" align="absmiddle" style="cursor:pointer;" onclick="qsbdcplayer(this.alt,true,'qsplayer_1');" /> 
    &nbsp;&nbsp;<a href="http://word.qsbdc.com/level_info.php?level_id=<?php echo $v['level_id'];?>" target="_blank">第<?php echo $v['level_id'];?>级</a></td>
    <td class="td_name" align="right"><input type="button" class="button add_word" id="<?php echo $v['id'];?>" value="加入单词本" /></td>
  </tr>
  <tr>
    <td colspan="2" class="zhushi"><?php echo $v['explain'];?></td>
  </tr>
  <tr>
    <td colspan="2"><div class="liju_t">参考例句：</div></td>
  </tr>
  <tr>
    <td colspan="2">
    <div class="liju">
      <ul>
      <?php 
	  $s=explode('||||',$v['sentence']);
	  foreach($s as $w=>$m){
	  ?>
      <li><?php echo $m;?></li>
      <?php
	  }
	  ?>
      </ul>
    </div>
    </td>
  </tr>
</table>
</div>

<?php
}
unset($tag_words);
?>
</div>
<!--单词开始-->

<div class="tcfx">
<!--顶踩-->
<div id="newdigg" class="newdigg"></div>
<!--顶踩-->
<div class="sp_bq"><script src="/front/static/js/share.js"></script></div>
<div class="boxoff"> <strong></strong> </div>
<div class="handle">
      <div class="context">
      	<?php
        $tag=$object->prev_next_arc($item['id']);
		?>
        <ul>
          <?php
          if(!empty($tag[0])){
		  ?>
          <li>上一篇：<a href="<?php echo $tag[0]['htmlurl'];?>" title="<?php echo $tag[0]['title'];?>"><?php echo $tag[0]['title'];?></a> </li>
          <?php
		  }else{
		  ?>
          <li>上一篇：没有了 </li>
          <?php
		  }
		  ?>
          
          <?php
          if(!empty($tag[1])){
		  ?>
          <li>下一篇：<a href="<?php echo $tag[1]['htmlurl'];?>" title="<?php echo $tag[1]['title'];?>"><?php echo $tag[1]['title'];?></a> </li>
          <?php
		  }else{
		  ?>
          <li>下一篇：没有了 </li>
          <?php
		  }
		  ?>
          
        </ul>
      </div>
      <div class="actbox">
        <ul>
          <li id="act-fav"><a id="fav" title="<?php echo $item['id'];?>" href="###">收藏</a></li>
          <li id="act-err"><a target="_blank" href="<?php echo url('arc','pick_error','id='.$item['id'],$this->virtual_pjt['PROJECT_URL']);?>">挑错</a></li>
          <li id="act-pus"><a target="_blank" href="<?php echo url('arc','recommend','id='.$item['id'],$this->virtual_pjt['PROJECT_URL']);?>">推荐</a></li>
          <li id="act-pnt"><a onclick="window.print();" href="#">打印</a></li>
        </ul>
      </div>
    </div>
</div>
<!--评论-->
<div class="pinglun">
<br />
<div style="text-align:center;"><strong>文章评论</strong> 共有评论 <span id="comment_count">0</span> 条 <a href="<?php echo url('comment','comment_list','arc_id='.$item['id'],$this->virtual_pjt['PROJECT_URL']);?>" target="_blank">查看全部</a></div>
<br />
<iframe id="destoon_comment" scrolling="no" frameborder="0" style="width: 99%; height: 400px;" name="destoon_comment" src="<?php echo url('comment','comment','arc_id='.$item['id'],$this->virtual_pjt['PROJECT_URL']);?>"></iframe>
</div>
<!--评论-->
</div>

<div class="index_r">

<div class="l_bian">
    <ul style="text-align:center;" class="l_top">会员登陆</ul>
	<div id="form_login"></div>
</div>

<div class="l_bian top8">
    <ul style="text-align:center;" class="l_top">热门单词标签</ul>
    <div>
<ul style="line-height: 23px;" class="c1 ico2">
	<?php
    $tag=$widget->hot_wordtags(20);
	$tag=(is_array($tag))?$tag:array();
	foreach($tag as $v){
	?>
    <a title="<?php echo $v['tag'];?>" target="_blank" href="<?php echo url('wordtag','arc_list','tag='.urlencode($v['tag']),$this->virtual_pjt['PROJECT_URL']);?>"><?php echo $v['tag'];?></a>&nbsp;
    <?php
	}
	unset($tag);
	?>
</ul>
    </div>
</div>
<div class="l_bian top8">
    <ul style="text-align:center;" class="l_top">热点内容</ul>
    <div style="width:100%; " class="l_box">
    <ul class="doing_ul_l">
    
	<?php
    $tag=$widget->hot_article(10);
	$tag=(is_array($tag))?$tag:array();
	foreach($tag as $k=>$v){
	?>
    <li><?php echo $k+1;?>.<a target="_blank" title="<?php echo $v['title'];?>" href="<?php echo $v['htmlurl'];?>"><?php echo $v['title'];?></a></li>
    <?php
	}
	unset($tag);
	?>
        
    </ul>
    </div>
</div>
<!---->
   <div class="l_bian top8">
    <ul style="text-align:center;" class="l_top">推荐内容</ul>
    <div style="width:100%; " class="l_box">
    <ul class="doing_ul_l">
	<?php
    $tag=$widget->cmd_article(10);
	$tag=(is_array($tag))?$tag:array();
	foreach($tag as $k=>$v){
	?>
    <li><?php echo $k+1;?>.<a target="_blank" title="<?php echo $v['title'];?>" href="<?php echo $v['htmlurl'];?>"><?php echo $v['title'];?></a></li>
    <?php
	}
	unset($tag);
	?>
    </ul>
    </div>
</div>       
</div>

</div>


<script language="javascript" type="text/javascript">
$(document).ready(function(){
		var aid='<?php echo $item['id'];?>';
		$.post('<?php echo url('arc','dig_data','',$this->virtual_pjt['PROJECT_URL']);?>',{'id':aid},function(data){
			if(data){
				$('#newdigg').html(data);	
			}	
		},'html');
});
function postDigg(ftype,aid){
	var taget_obj = $('#newdigg');
	var saveid = get_cookie('diggid');
	if(saveid != null){
		var saveids = saveid.split(',');
		var hasid = false;
		saveid = '';
		j = 1;
		for(i=saveids.length-1;i>=0;i--){
			if(saveids[i]==aid && hasid) {
				continue;
			}else {
				if(saveids[i]==aid && !hasid) {
					hasid = true;
				}
				saveid += (saveid=='' ? saveids[i] : ','+saveids[i]);
				j++;
				if(j==20 && hasid) break;
				if(j==19 && !hasid) break;
			}
		}
		if(hasid) { 
			alert("您已经顶过该帖，请不要重复顶帖 ！"); return;
		}else{ 
			saveid += ','+aid;
		}
		set_cookie('diggid',saveid,<?php echo $item['id'];?>);
	}else{
		set_cookie('diggid',aid,<?php echo $item['id'];?>);
	}
	if(ftype=='good'){
		var u='<?php echo url('arc','dig_good','',$this->virtual_pjt['PROJECT_URL']);?>';	
	}else{
		var u='<?php echo url('arc','dig_bad','',$this->virtual_pjt['PROJECT_URL']);?>';
	}
	$.post(u,{'id':aid},function(data){
		if(data){
			$('#newdigg').html(data);	
		}	
	},'html');
}

$(document).ready(function(){
	var islogin=get_cookie('islogin');
	$('#fav').click(function(){
		if(islogin){
			$.post('<?php echo url('arc','favorite','',$this->virtual_pjt['PROJECT_URL']);?>',{'id':$(this).attr('title')},function(data){
					var code=parseInt(data.code);
					if(code<=0){
						alert(data.msg);
						if(code==-2){
							//登陆
							//window.open('http://www.qsbdc.com/');
						}
						return;
					}else{
						alert(data.msg);	
					}
			},'json');	
		}else{
			alert('请先登陆！');	
			//window.open('http://www.qsbdc.com/');
			return;
		}
	});
});
</script>
<!--尾部开始-->
<?php include(dirname(dirname(__FILE__)).'/footer.inc.php');?>
<!--尾部结束-->

<div style="display:none;">
<div id="inline_example">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center"><strong>我的单词印象</strong></td>
  </tr>
  <tr>
    <td align="center">
    <input name="type" id="t1" type="radio" value="1" checked /><label for="t1">完全不认识</label>
    <input name="type" id="t2" type="radio" value="2" /><label for="t2">有点印象</label>
    <input name="type" id="t3" type="radio" value="3" /><label for="t3">比较熟悉</label>   
    </td>
  </tr>
  <tr>
    <td>我的理解：<textarea name="myidea" id="myidea" cols="50" rows="4"></textarea></td>
  </tr>
  <tr>
  <td align="center"><input name="sure" id="sure" type="button" value="确定" class="button" /></td>
  </tr>
</table>
</div>
</div>

</body>
</html>